home *** CD-ROM | disk | FTP | other *** search
/ PC-X 1997 October / pcx14_9710.iso / swag / delphi.swg / 0040_Searching your application's help file.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-11-22  |  718 b   |  23 lines

  1.  
  2. The following code demonstrates how to bring up the WinHelp "Search"
  3. dialog for your application's help file.  You can use TApplication's
  4. HelpCommand method to send the Help_PartialKey command to the WinHelp
  5. system. The parameter for this command should be a PChar (cast to a
  6. longint to circumvent typechecking) that contains the string on
  7. which you'd like to search.  The example below uses an empty string,
  8. which invokes "Search" dialog and leaves the edit control in the
  9.  
  10. dialog empty.
  11.  
  12. procedure TForm1.SearchHelp;
  13. var
  14.   P: PChar;
  15. begin
  16.   Application.HelpFile := 'c:\delphi\bin\delphi.hlp';
  17.   P := StrNew('');
  18.   Application.HelpCommand(Help_PartialKey, longint(P));
  19.   StrDispose(P);
  20. end;
  21.  
  22.  
  23.